import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service
const request = {
    //新增事实外包方
    correspondentUnitAdd (params) {
        return httpPost({
            url: '/outer/facto/out/sourcer/add',
            params
        })
    },
    //高级查询事实外包方
    correspondentUnitList (params) {
        return httpPost({
            url: '/outer/facto/out/sourcer/list/advanced',
            params
        })
    },
    //获取事实外包方基础信息
    getcorrespondentUnit (params) {
        return httpGet({
            url: '/outer/facto/out/sourcer/get/by/id',
            params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    //修改事实外包方
    updatecorrespondentUnit (params) {
        return httpPost({
            url: '/outer/facto/out/sourcer/update',
            params,
        })
    },
    //获取事实外包方变更历史
    getcorrespondentUnitHistory (params) {
        return httpGet({
            url: '/outer/facto/out/sourcer/get/change/history',
            params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**
     *
     * @param {*} params
     * @returns
     * 事实外包方明细接口
     */
    //添加事实外包方明细
    addCorrespondentUnitDetailed (params) {
        return httpPost({
            url: '/outer/facto/out/sourcer/dtl/add',
            params,
        })
    },
    //获取事实外包方基础信息明细
    getCorrespondentUnitDetailed (params) {
        return httpGet({
            url: '/outer/facto/out/sourcer/dtl/get/by/id',
            params,
        })
    },
    //获取事实外包方基础信息明细
    updateCorrespondentUnitDetailed (params) {
        return httpPost({
            url: '/outer/facto/out/sourcer/dtl/update',
            params,
        })
    },
    /**
     * 事实外包方变更接口
     */
    //新增变更事实外包方基础信息
    correspondentUnitChangeAdd (params) {
        return httpPost({
            url: '/outer/facto/out/sourcer/change/add',
            params,
        })
    },
    //获取变更事实外包方基础信息
    getCorrespondentUnitChange (params) {
        return httpGet({
            url: '/outer/facto/out/sourcer/change/get/by/id',
            params,
        })
    },
    //变更修改事实外包方
    updateCorrespondentUnitChange (params) {
        return httpPost({
            url: '/outer/facto/out/sourcer/change/update',
            params,
        })
    },
    //变更修改事实外包方明细
    updateCorrespondentUnitChangeDetailed (params) {
        return httpPost({
            url: '/outer/facto/out/sourcer/change/update/dtl',
            params,
        })
    },
    //获取变更事实外包方基础信息明细
    getCorrespondentUnitChangeDetailed (params) {
        return httpGet({
            url: '/outer/facto/out/sourcer/get/by/id/dtl',
            params,
        })
    },
}
export default request